<template>
  <div class="footer">
    <div class="footer-contain">
      <img :src="footerInfo.centerImg" alt="" />
      <div class="footer-center">
        <div class="footer-left">
          <p>{{ footerInfo.comName }}</p>
          <p>{{ footerInfo.comAdress }}</p>
          <ul class="leftList">
            <li v-for="(item, index) in centerList" :key="index">
              {{ item.listLi }}
            </li>
          </ul>
        </div>
        <div class="footer-middle">
          <ul>
            <li>
              <img :src="footerInfo.middleImg" alt="" />
            </li>
            <li>
              <p>{{ footerInfo.phone }}</p>
              <h5>{{ footerInfo.phoneNum }}</h5>
            </li>
          </ul>
        </div>
        <div class="footer-right">
          <ul>
            <li>
              <img :src="footerInfo.rightImg" alt="" />
            </li>
            <li>{{ footerInfo.attention }}</li>
          </ul>
        </div>
      </div>
      <div class="footer-bottom">
        <p>
          北京圆心惠保科技有限公司&nbsp;&nbsp;京ICP备19043223号&nbsp;&nbsp;
          <img
            :src="footerInfo.icpImg"
            alt=""
          />&nbsp;&nbsp;京公网安备&nbsp;&nbsp;11010502044141号
        </p>
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from "vuex";
// import { FooterApi } from "@/api/api";
export default {
  data() {
    return {
      // centerList: [],
      // footerInfo: {},
    };
  },
  mounted() {
    // this.getFooterList();
    this.$store.dispatch("ft/AfooterApi");
  },
  computed: {
    ...mapState({
      centerList: (state) => state.ft.centerList,
      footerInfo: (state) => state.ft.footerInfo,
    }),
  },
  methods: {
    // getFooterList() {
    //   // console.log(222);
    //   // FooterApi.footerList().then((res) => {
    //   //   // console.log(3, res.data);
    //   //   const { centerList, footerInfo } = res.data;
    //   //   this.footerInfo = footerInfo;
    //   //   this.centerList = centerList;
    //   //   // console.log(4,this.footerInfo, this.centerList);
    //   // });
    // },
  },
};
</script>

<style scoped lang="less">
.footer {
  width: 100%;
  height: 347px;
  background: #000000;
}
.footer-contain {
  display: flex;
  flex-direction: column;
  color: #efefef;
  width: 1204px;
  height: 272px;
  margin: auto;
  padding-top: 57px;
}
.footer-contain > img:nth-child(1) {
  width: 137px;
  height: 36px;
}
.footer-center {
  div {
    float: left;
    border-right-style: 1px solid #efefef;
  }
  .footer-left {
    width: 504px;
    height: 100px;
    border-right: 1px #343434 solid;
    p {
      text-align: left;
      margin: 10px;
    }
    ul {
      margin-left: 10px;
      margin-top: 30px;
    }
    ul > li {
      float: left;
      border-right: 1px solid #efefef;
      margin-right: 18px;
      padding-right: 18px;
    }
    .leftList > li:last-child {
      border-right: none;
    }
  }
  .footer-middle {
    height: 100px;
    border-right: 1px solid #343434;
    margin-right: 20px;
    padding-right: 20px;
    img {
      width: 74px;
    }
    ul > li:nth-child(1) {
      margin-right: 18px;
      margin-left: 10px;
    }
    li {
      float: left;
      text-align: left;
      p {
        font-size: 20px;
        line-height: 34px;
      }
      h5 {
        font-size: 30px;
      }
    }
  }
  .footer-right {
    padding-left: 45px;
    img {
      width: 100px;
    }
    ul > li:nth-child(2) {
      font-size: 15px;
      color: #3880e7;
      margin-top: 10px;
    }
  }
}
.footer-bottom {
  margin-top: 45px;
  img {
    width: 17px;
  }
}
</style>